package com.futao;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import javax.annotation.Resource;

/**
 * @author futao
 * Created on 18-6-6-下午8:38.
 * lanjieqi
 */
@Configuration
public class MyInterceptor extends WebMvcConfigurerAdapter {

    @Resource
    private OneInterceptor oneInterceptor;

    /**
     * lan jie qi
     *
     * @param registry
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(oneInterceptor).addPathPatterns("/*/**");
        super.addInterceptors(registry);
    }
}
